import Vue from 'vue'
import VueRouter from 'vue-router'
import wenda from '../router/questions';
import spfllist from '../components/main/spfl/spfllist.vue'

Vue.use(VueRouter)

const routes = [


  {
    path: '/register',
    name: 'register',
    component: () => import('../pages/register.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../pages/Login.vue'),
  },
  // 默认页面
  {
    path: '/',
    redirect: '/main',
  },
  {
    path: '/main',
    name: 'route',
    component: () => import('../pages/main.vue'),
  },
  // 1.================================================

  // 我的页面
  {
    path: '/wode',//
    name: 'wode',//
    component: () => import('../pages/wode.vue'),

  },

  // 设置页面
  {
    path: '/wode/set',
    component: () => import('../components/wode/set.vue'),
  },
  // 勋章库
  {
    path: '/wode/medal',
    component: () => import('../components/wode/medal.vue'),
  },
  // 作品
  {
    path: '/wode/zuopin',
    component: () => import('../components/wode/zuopin.vue'),
  },
  // 食谱
  {
    path: '/wode/food',
    component: () => import('../components/wode/food.vue'),
  },
  // 收藏
  {
    path: '/wode/collect',
    component: () => import('../components/wode/collect.vue'),
  },
  // 问题
  {
    path: '/wode/question',
    component: () => import('../components/wode/question.vue'),
  },
  // 关注
  {
    path: '/wode/guan',
    component: () => import('../components/wode/guan.vue'),
  },
  // 粉丝
  {
    path: '/wode/fan',
    component: () => import('../components/wode/fan.vue'),
  },
  // 精彩活动
  {
    path: '/wode/activity',
    component: () => import('../components/wode/activity.vue'),
  },
  // 个人设置
  {
    path: '/wode/personal',
    component: () => import('../components/wode/personal.vue'),
  },
  // 设置页面
  {
    path: '/wode/set',
    component: () => import('../components/wode/set.vue'),
  },
  //2.======================================================
  // 烘培圈-问答
  wenda,
  // 圈,详情
  {
    path: '/xq',
    name: 'routeName',
    component: () => import('../views/questions/xq.vue'),
  },
  // 加+++//
  {
    path: '/jia',
    name: 'routeName',
    component: () => import('../views/jia/jia.vue'),
  },
  // search
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/search/search.vue'),
  },
  // 铃铛消息
  {
    path: '/xiaoxi',
    name: 'routeName',
    component: () => import('../views/xiaoxi/xiaoxi.vue'),
  },
  //3.=========================================================
  {
    path: '/class',//烘焙课堂
    name: 'Name',
    component: () => import('../pages/class.vue'),
  },
  {
    path: '/spfl',//烘焙课堂内容
    name: 'Main',
    component: () => import('../components/main/spfl/spfl.vue'),
  },
  {
    path: '/class',//烘焙课堂
    name: 'Name',
    component: () => import('../pages/class.vue'),
  },
  {
    path: '/spfl',//烘焙课堂内容
    name: 'routeName',
    component: () => import('../components/main/spfl/spfl.vue'),
  },

  {
    path: '/spfllist',//烘焙课堂内容细节
    component: spfllist,
  },
  {
    path: '/detail',//烘焙课堂视频页,
    name: 'detail',
    component: () => import('../components/main/spfl/detail.vue'),
  },

  //4.=========================================================
  // 每日签到
  {
    path: '/qiandao',
    name: 'QianDao',
    component: () => import('../views/meiriqiandao/QianDao.vue'),
  },
  // 签到里的规则
  {
    path: '/qiandao/guize',
    name: 'Guize',
    component: () => import('../views/meiriqiandao/GuiZe.vue'),
  },
  // 学员作业
  {
    path: '/xueyuan',
    name: 'Xueyuan',
    component: () => import('../views/xinshouzhinan/XueYuan.vue'),
  },
  // 详情页
  {
    path: '/guidebook/detail',
    name: 'Detail',
    component: () => import('../views/xinshouzhinan/Detail.vue'),
  },
  //新手指南
  {
    path: '/guidebook',
    name: 'Guidebook',
    component: () => import('../views/xinshouzhinan/Guidebook.vue'),
  },
  // 烘焙百科
  {
    path: '/hongbei',
    name: 'Hongbei',
    component: () => import('../views/hongpei/HongBei.vue'),
  },
  // 烘焙百科子路由
  {
    path: '/cures',
    name: 'Cures',
    // component: () => import('../views/hongbei/Cures.vue'),
    component: () => import('../views/hongpei/Cures.vue')
  },
]
//
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
